// <copyright file="Product.cs" company="EnterpriseApi">
// Copyright (c) EnterpriseApi. All rights reserved.
// </copyright>

namespace EnterpriseApi.Models;

/// <summary>
/// 产品实体类，代表系统中的产品
/// </summary>
public class Product
{
    /// <summary>
    /// 产品唯一标识符
    /// </summary>
    public int Id { get; set; }

    /// <summary>
    /// 产品名称
    /// </summary>
    public required string Name { get; set; }

    /// <summary>
    /// 产品描述
    /// </summary>
    public string? Description { get; set; }

    /// <summary>
    /// 产品价格
    /// </summary>
    public decimal Price { get; set; }

    /// <summary>
    /// 产品库存数量
    /// </summary>
    public int StockQuantity { get; set; }

    /// <summary>
    /// 产品图片URL
    /// </summary>
    public string? ImageUrl { get; set; }

    /// <summary>
    /// 产品创建时间
    /// </summary>
    public DateTime CreatedAt { get; set; } = DateTime.UtcNow;

    /// <summary>
    /// 产品最后更新时间
    /// </summary>
    public DateTime? UpdatedAt { get; set; }

    /// <summary>
    /// 产品是否可用
    /// </summary>
    public bool IsAvailable { get; set; } = true;

    /// <summary>
    /// 产品所属类别ID
    /// </summary>
    public int CategoryId { get; set; }
    public Category Category { get; set; } = null!;
}